Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added nodes.read endpoint so you can query by hostname to get the system_id indirectly #239

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

dandruczyk
Copy link

@dandruczyk dandruczyk commented Jun 3, 2020

The nodes endpoint is completely missing in facade.py Added the nodes.read (thus client.nodes.read(hostnames=[]) This allows for querying maas by hostname QUICKLY which gets you the system_id which you can then query for full machine detail. This a workaround due to clien.machines.read() only accepting a system_id argument unlike the maas Client API distributed with maas since at least 2.6.2 which supports querying on a wide variety of criteria see #238

@codecov-commenter
Copy link

Codecov Report

Merging #239 into master will decrease coverage by 0.00%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #239      +/-   ##
==========================================
- Coverage   67.98%   67.98%   -0.01%     
==========================================
  Files          70       70              
  Lines        5726     5728       +2     
  Branches      988      988              
==========================================
+ Hits         3893     3894       +1     
- Misses       1610     1611       +1     
  Partials      223      223              
Impacted Files Coverage Δ
maas/client/facade.py 93.75% <50.00%> (-1.13%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 069e758...0053170. Read the comment docs.

@codecov-io
Copy link

Codecov Report

Merging #239 (0053170) into master (575d3f7) will decrease coverage by 0.00%.
The diff coverage is 50.00%.

❗ Current head 0053170 differs from pull request most recent head 1896d59. Consider uploading reports for the commit 1896d59 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #239      +/-   ##
==========================================
- Coverage   67.98%   67.98%   -0.01%     
==========================================
  Files          70       70              
  Lines        5726     5728       +2     
  Branches      988      988              
==========================================
+ Hits         3893     3894       +1     
- Misses       1610     1611       +1     
  Partials      223      223              
Impacted Files Coverage Δ
maas/client/facade.py 93.75% <50.00%> (-1.13%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1f63780...1896d59. Read the comment docs.

Copy link

@cpg1111 cpg1111 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! Can you please add a test for this in this file https://github.com/maas/python-libmaas/blob/master/maas/client/tests/test_facade.py ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants